  通讯录的优化
book.h
#pragma once
#pragma warning(disable:4996)
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
//#include<windows.h>
//#define MAX_PEOPLE 1
extern void Menu();
extern void Mod_Menu();
extern void Swap(struct people_info x1, struct people_info x2);
extern int fine(struct address_book* book);
extern int Book_init(struct address_book* book);
extern void Book_add(struct address_book* book);
extern int Book_fine(struct address_book* book);
extern int Book_del(struct address_book* book);
extern int Book_mod(struct address_book* book);
extern void Book_print(struct address_book* book);
extern void Print(struct address_book* book,int i);
extern void Book_clear(struct address_book* book);
extern void Book_sort(struct address_book* book);
extern int CheckCapacity(struct address_book* book);//检查扩容函数
extern void Destrory_Book(struct address_book* book);//申请堆空间销毁函数
extern void SaveContact(struct address_book* book);//退出前把数据保存到文件里
extern void LoadContact(struct address_book* book);//将文件数据加载到通讯录中
//人的信息声明
struct people_info {
        int age;
        char name[32];
        char sex[8];
        char phone[16];
        char address[32];
};//尽量减少内存占用
//通讯录的信息声明
struct address_book {
//      struct people_info p[MAX_PEOPLE];
        struct people_info* p;//动态增长的空间
        int capacity;//最大容量-MAX_PEOPLE
        int cur_size;//当前联系人数量
};
